//
//  User_Me.m
//  ChangChat
//
//  Created by Cocoa on 2019/9/2.
//  Copyright © 2019 yibai. All rights reserved.
//


#import "User.h"
#import <LKDBHelper/LKDBHelper.h>

@implementation User

+ (NSString *)getPrimaryKey {
    return @"ID";
}

- (NSString *)getMyCardJson {
    NSDictionary *json = @{@"id": self.ID,
                           @"avatar": self.avatar,
                           @"username": self.username,
                           @"qr_type": @"user",
                           };
    
    return [json mj_JSONString];
}
- (NSString *)displayName {
    if (self.nickname.isHaveStr) {
        return self.nickname;
    }
    return self.username;
}
- (NSString *)friend_id {
    return self.ID;
}
@end
